<template>
	<view class="home-template5">
		<view class="jd_b">
			<image src="/static/icon/jcrs-bg.png" class="jcrs_bg" mode=""></image>
			<view class="jd_b_box">
				<view class="jd_tit">
					<text>当前就餐人数</text>
					<text class="jc_count">{{numberOfDiners}}人</text>
				</view>
				<view class="jd">
					<u-line-progress :percentage="Math.round(numberOfDiners/10)" :showText="false" height="10"
						activeColor="rgb(238,0,0)" inactiveColor="rgb(238,238,238)">
					</u-line-progress>
				</view>
			</view>
		</view>
	</view>
</template>
<script>
	import {dunnerNumber} from "@/http";
	export default {
		name: "HomeTemplate5",
		data() {
			return {
				numberOfDiners: 0,
				bgObj1: {}
			}
		},
		methods: {
			async init(options) {
				let res1 = await dunnerNumber({});
				this.numberOfDiners = Number(res1.data.msg);
			}
		}
	}
</script>

<style lang="scss" scoped>
	.home-template5 {
		.jd_b {
			position: relative;
			height: 150rpx;

			.jd_b_box,
			.jcrs_bg {
				position: absolute;
				top: 0;
				left: 0;
				height: 100%;
				z-index: 0;
			}

			.jcrs_bg {
				width: 100%;
				border-radius: 15rpx;
			}

			.jd_b_box {
				z-index: 1;
				left: 32rpx;
				right: 32rpx;
				top: 32rpx;
			}

			.jd_tit {
				font-size: 28rpx;
				color: #000000;
				font-weight: bold;
				margin-bottom: 20rpx;
				display: flex;
				align-items: center;
				justify-content: space-between;

				.jc_count {
					color: #FF575E;
					font-weight: 600;
					font-size: 36rpx;
					margin-right: 6rpx;
				}
			}
		}
	}
</style>
